package cn.com.tpUtil;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {
	private static final Log log = LogFactory.getLog(PropertiesUtil.class);

	public static String getProp(String inputKey) {

		String outValue = "";
		PropertiesUtil loadProp = new PropertiesUtil();
		InputStream in = loadProp.getClass().getResourceAsStream("/config.properties");

		Properties prop = new Properties();

		try {
			prop.load(in);
			outValue = prop.getProperty(inputKey);
			in.close();
		} catch (Exception e) {

			log.error("PropertiesUtil Exception :" + e.getMessage());
		}

		return outValue;
	}
}